package com.spsoft.workflow.model.dto.bus;

import com.spsoft.core.annotation.EnumClassValue;
import com.spsoft.workflow.common.enums.BusFlowTypeEnums;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
@ApiModel(value="保存并提交流程入参")
public class SaveAndSubmitDto {

    @ApiModelProperty(value = "业务流程ID" ,required = true)
    @NotNull(message = "业务流程ID不能为空")
    private Long busId;

    @ApiModelProperty(value = "审批人" ,required = true)
    @NotNull(message = "审批人不能为空")
    private String approvalUser;

    @ApiModelProperty(value = "事项说明")
    private String description;

    @ApiModelProperty(value = "发起时间" ,required = true)
    @NotNull(message = "发起时间不能为空")
    private String createTime;

    @ApiModelProperty(value = "业务数据（json字符串）")
    private String busData;

    @ApiModelProperty(value = "业务流程类型(FLOW_SGKP:手工开票;FLOW_YFMLY:预赋码领用;FLOW_XZSXED:下载授信额度;FLOW_THSXED:退回授信额度 )",required = true  )
    @EnumClassValue(clazz = BusFlowTypeEnums.class, message = "业务流程类型不正确")
    @NotNull(message = "业务流程类型不能为空")
    private String busType;

    @ApiModelProperty(value = "是否提交（true，false）" ,required = true)
    @NotNull(message = "是否提交为空")
    private Boolean submit;
}
